﻿using System;
using System.Collections.Generic;
using System.Text;
using IDAL.RF.Repair;
using Model.RF.Repair;

namespace BLL.RF.Repair
{
    public class RepairConfig : BaseService<RepairConfigInfo>
    {
        private static readonly IRepairConfig dal = DALFactory.DataAccess.CreateRepairConfig();

        public override void SetCurrentRepository()
        {
            CurrentRepository = dal;
        }

        public IList<RepairConfigInfo> RepairConfig_GetbyPath(string repairPath)
        {
            return dal.RepairConfig_GetbyPath(repairPath);
        }

        public void RepairConfig_RemovebyPath(string repairPath)
        {
            dal.RepairConfig_RemovebyPath(repairPath);
        }

        public string GetRepairStepbyPath(string repairPath)
        {
            string status = "返修节点：";
            IList<RepairConfigInfo> list = dal.RepairConfig_GetbyPath(repairPath);
            foreach (RepairConfigInfo item in list)
            {
                status += item.RepairStep + "，";
            }
            return status;
        }
    }
}
